<?php

declare(strict_types=1);

namespace app\jobs\crontab;

use owns\facade\OwnsLog;
use owns\interface\CrontabInterface;
use think\facade\Log;

/**
 * 定时任务 - demo
 */
class CrontabDemo extends CrontabInterface
{
    public static $cron = '*/5 * * * *';

    /**
     * 业务逻辑
     */
    public function toTask(): void
    {
        //Log::notice("任务" . self::$name . "执行成功");
        OwnsLog::notice('任务' . self::$name . "执行成功", 'crontab');
    }
}
